import BIM from "@/editor/KY3D";
import { Event } from "@/editor/framework/event/Event";
import { Keyboard } from "@/editor/framework/event/Keyboard";
import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader';
import KY3D from "@/editor/KY3D";

export default class TestModule implements IPlugin {

    startUp(): void {
        console.log("test module start up.")
        

        this.addMold();
    }

    exit(): void {
       
        console.log("test module exit.")
        this.dispose();
       
    }

    dispose(): void {
        
    }

    private addMold():void {
        new GLTFLoader()
        .setPath( 'models/gltf/' )
        .load( 'SheenChair.glb', function ( gltf ) {

            let scene = KY3D.MGR.scene.main.scene;
            scene.add( gltf.scene );

            // const object = gltf.scene.getObjectByName( 'SheenChair_fabric' );

            // const gui = new GUI();

            // gui.add( object.material, 'sheen', 0, 1 );
            // gui.open();

        } );

    }
}